import {createRouter, createWebHistory} from 'vue-router'

const routes = [
    {
        path: '/',
        redirect: '/login',
    },
    {
        name: 'login',
        path: '/login',
        component: () => import('../views/login.vue')
    },
    {
        name: 'index',
        path: '/index',
        component: () => import('../views/index.vue')
    },
    {
        name: 'register',
        path: '/register',
        component: () => import('../views/register.vue')
    },
    {
        path: '/chat/:sessionId',
        name: 'chat',
        component: () => import('../views/index.vue')
    },
    {
        name: 'test',
        path: '/test',
        component: () => import('../views/test.vue')
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
